home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 9
/
The PC-SIG Library on CD ROM - Ninth Edition.iso
/
501_600
/
DISK0510
/
DISK0510.ZIP
/
MATH
< prev
next >
Wrap
Text File
|
1985-08-08
|
640b
|
25 lines
PROGRAM MATH; {some simple math calculations}
VAR
A,B : INTEGER;
OPERATOR : CHAR;
BEGIN {----------------------------------------------------------}
CLS;
WRITE('ENTER A NUMBER: ');
READLN(A);
WRITELN;
WRITE('ENTER ANOTHER: ');
READLN(B);
WRITELN;
WRITE('ENTER AN OPERATOR(+,-,*,/): ');
READLN(OPERATOR);
WRITE('A '); WRITE(OPERATOR); WRITE(' B = ');
CASE OPERATOR OF
'+' : WRITELN(A+B);
'-' : WRITELN(A-B);
'*' : WRITELN(A*B);
'/' : WRITELN(A/B);
END;{case}
END.